package com.applink.sell_proof.model;

public class ClaimImage extends MyImage {

	private boolean mIsDelete = false;
	private int mDegree = 0;
	private long mImageId = 0;

	public int getRotateDegree() {
		return mDegree;
	}

	public void doRotate(boolean input) {

		if (input) {
			mDegree += 90;
		} else {
			mDegree -= 90;
		}

		if (mDegree >= 360)
			mDegree -= 360;

		if (mDegree < 0)
			mDegree += mDegree + 360;
	}

	public void setRotateDegree(int mDegree) {
		this.mDegree = mDegree;
	}

	public boolean isDelete() {
		return mIsDelete;
	}

	public void setDelete(boolean isDelete) {
		this.mIsDelete = isDelete;
	}

	@Override
	public boolean equals(Object v) {
		boolean retVal = false;

		if (v instanceof ClaimImage) {
			ClaimImage ptr = (ClaimImage) v;
			retVal = ptr.mImageLocation.toString().equals(
					this.mImageLocation.toString());
		}

		return retVal;
	}

	@Override
	public int hashCode() {
		int hash = 7;

		hash = 17
				* hash
				+ (this.mImageLocation != null ? this.mImageLocation.hashCode()
						: 0);

		return hash;
	}

	public long getClaimImageId() {
		return mImageId;
	}

	public void setClaimImageId(long mImageId) {
		this.mImageId = mImageId;
	}
}
